package com.ruicar.afs.cloud.bizcommon.commission.feign;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.bizcommon.commission.dto.reward.*;
import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Description;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author yaorui.zhang
 * @version 1.0
 * @Description 佣金系统-摊销奖励
 * @date create on 2020年6月8日 15:26:49
 * @since 1.0
 */
@FeignClient(name = "RewardFeign", url = "${com.greatwall.systems.commission-system.url}")
public interface RewardFeign {

    @Description("摊销奖励-摊销奖励类型列表")
    @PostMapping(value = "/reward/rewardtypes", consumes = MediaType.APPLICATION_JSON_VALUE)
    public JSONObject rewardtypes();


    @Description("摊销奖励-下发信息列表")
    @PostMapping(value = "/reward/getlist")
    public JSONObject getlist(@RequestBody GetRewardListDto getRewardListDto, @RequestHeader Map<String, String> headers);

    @Description("摊销奖励-确认函退回列表")
    @PostMapping(value = "/reward/attachbacklist", consumes = MediaType.APPLICATION_JSON_VALUE)
    public JSONObject attachbacklist(@RequestBody CreditRewardReturnListDto dto,@RequestHeader Map<String, String> headers);

    @Description("摊销奖励-合同信息列表")
    @PostMapping(value = "/reward/getcontractlist", consumes = MediaType.APPLICATION_JSON_VALUE)
    public JSONObject getcontractlist(@RequestBody GetContractListDto dto);

    @Description("摊销奖励-导出合同Excel")
    @GetMapping(value = "/reward/export")
    Response export(@RequestParam("id") String id);

    @Description("摊销奖励-下载确认函")
    @GetMapping(value = "/reward/signletter")
    Response signletter(@RequestParam("id") String id);

    @Description("摊销奖励-经销商确认回执")
    @PostMapping(value = "/reward/confirmreceipt", consumes = MediaType.APPLICATION_JSON_VALUE)
    public JSONObject confirmreceipt(@RequestBody JSONObject json);

    @Description("摊销奖励-回执退回后重新确认回执")
    @PostMapping(value = "/reward/confirmletter", consumes = MediaType.APPLICATION_JSON_VALUE)
    public JSONObject confirmletter(@RequestBody JSONObject json);

    @Description("摊销奖励-获取邮寄信息列表")
    @PostMapping(value = "/reward/getexpresslist", consumes = MediaType.APPLICATION_JSON_VALUE)
    public JSONObject getexpresslist(@RequestBody JSONObject json);

    @Description("摊销奖励-经销商发票历史列表")
    @PostMapping(value = "/reward/receipthistory", consumes = MediaType.APPLICATION_JSON_VALUE)
    public JSONObject receipthistory(@RequestBody JSONObject json);

    @Description("基本服务费-保存邮寄信息")
    @PostMapping(value = "/reward/confirmexpress", consumes = MediaType.APPLICATION_JSON_VALUE)
    public JSONObject confirmexpress(@RequestBody ConfirmExpressDto dto);

    @Description("摊销奖励-经销商确认已打款")
    @PostMapping(value = "/basecommission/confirmreceivemoney", consumes = MediaType.APPLICATION_JSON_VALUE)
    public JSONObject confirmreceivemoney(@RequestBody ConfirmReceiveMoneyDto dto);

}
